Method and apparatus for controlling charging in electronic device

ABSTRACT

A method for controlling charging in an electronic device for managing the electronic device, to stably charge a battery is provided. The method includes setting alarm such that a wake up signal is generated after a time elapses when entry into a suspend mode is requested during charging a battery or in a charging stop state, entering the suspend mode, waking-up and determining a state of the battery wake up, and turning-on or -off the battery charging according to the determined state of the battery.

PRIORITY

This application is a Continuation Application of U.S. patentapplication Ser. No. 13/538,354 filed in the U.S. Patent and TrademarkOffice on Jun. 29, 2012, and claims priority under 35 U.S.C. §119(e) toa U.S. Provisional application filed on Oct. 21, 2011 in the U.S. Patentand Trademark Office and assigned Ser. No. 61/550,011, and under 35U.S.C. §119(a) to a Korean

Patent Application filed on May 23, 2012 in the Korean IntellectualProperty Office and assigned Serial No. 10-2012-0054671, the contents ofeach of which are incorporated herein by reference.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates generally to a method and an apparatus forcontrolling charging in an electronic device, and more particularly, toa method for controlling charging in an electronic device for managingthe electronic device and for stably charging a battery, and anapparatus thereof.

2. Description of the Related Art

In recent years, with the significant development of information,communication and semiconductor technologies, supply and use of anelectronic device have rapidly increased. The electronic device hasprovided various functions such as a call function, a music playbackfunction, a character message transmission/reception function, a digitalbroadcasting receiving function, a near distance wireless communicationfunction, and an Internet access function. The electronic device uses abattery, which is a chargeable secondary cell, due to portability.

When excessive physical force is applied to the battery or the batteryis charged in a high or low temperature environment, a problem such asexplosion may occur. Thus, the electronic device needs to continuouslymonitor a state (temperature) of a battery during charging. To do so inthe prior art, however, the electronic device cannot enter a suspendstate during battery charging.

The conventional electronic device cannot enter in the suspended stateand controls charging while continuously monitoring the battery state,which causes excessive power consumption. Particularly, in theconventional art, when a battery is charged with a charger having asmall charging amount, the battery can not be charged. Excessive heat isalso generated due to continuous driving of an electronic component,diminishing battery life and potentially causing the battery to succumbto high temperature and possibly explode.

There has also been proposed a method using separate hardware componentsthat consume less power, and in which a battery is monitored in asuspended state. However, the addition of separate hardware componentsincreases manufacturing cost of the electronic device.

SUMMARY OF THE INVENTION

The present invention has been made in view of the above problems, andprovides a method for controlling charging in an electronic device whichallows the electronic device to enter a suspend mode without adding aseparate hardware arrangement, and monitor a state of a battery tostably charge the battery, and an apparatus thereof.

In accordance with an aspect of the present invention, a method forcontrolling charging in an electronic device includes setting alarm suchthat a wake-up signal is generated after a time elapses when entry intoa suspend mode is requested during charging a battery or in a chargingstop state, and entering the suspend mode, waking-up to determine astate of the battery by at least partial structural components of theelectronic device when the wake-up signal is generated by the set alarmin the suspend mode, and turning-on or -off the charging of the batteryaccording to the determined state of the battery.

In accordance with another aspect of the present invention, an apparatusfor controlling charging in an electronic device includes a chargingunit for charging a battery of the electronic device, a temperaturesensor for measuring a temperature of the battery, an alarm unit forsetting alarm generating a wake-up signal after a preset time elapses,and a controller for activating the alarm unit and controlling such thatthe charging unit enters a suspend mode when the charging unit requestsentry into the suspend mode in an enabled state, and for waking-up atleast partial structural components to determine a temperature of thebattery when a wake-up signal is generated by the alarm unit in thesuspend mode, and turning-on/off the charging unit according to thedetermined result.

BRIEF DESCRIPTION OF THE DRAWINGS

The aspects, features and advantages of the present invention will bemore apparent from the following detailed description in conjunctionwith the accompanying drawings, in which:

FIG. 1 illustrates a configuration of an electronic device according toan embodiment of the present invention;

FIG. 2 illustrates a controller among a configuration of an electronicdevice according an embodiment of the present invention in detail;

FIG. 3 illustrates a method for controlling charging in an electronicdevice according to an embodiment of the present invention; and

FIG. 4 illustrates a method for controlling charging in an electronicdevice according to an embodiment of the present invention in detail.

DETAILED DESCRIPTION OF EMBODIMENTS OF THE INVENTION

Embodiments of the present invention are described with reference to theaccompanying drawings in detail. The same reference numbers are usedthroughout the drawings to refer to the same or like parts. Detaileddescriptions of well-known functions and structures incorporated hereinare omitted to for the sake of clarity and conciseness.

The electronic device according to the present invention is a terminalfor providing a battery charging function, such as a mobilecommunication terminal, a Personal Digital Assistant (PDA), a SmartPhone, a tablet Personal Computer (PC), a Portable Multimedia Player(PMP), an Electronic Book terminal, a Notebook PC, a Netbook computer,or an Ultra Mobile Personnel Computer (UMPC).

As used herein, the term “suspend mode” is for minimizing powerconsumption, and refers to an idle mode, a rest mode, or a system savingmode.

As used herein, the term “wake up mode” refers to when an electrode isrunning as a comparison concept with the suspend mode. The wake up modemay include a full wake up mode in which the entire configuration of anelectronic device wakes-up and a partial wake up mode in which only apartial configuration for controlling charging among the configurationof the electronic device wakes-up. For example, in the partial wake upmode, a temperature sensor for determining a state of a battery, acontroller for turning-on/off charging according to the state of thebattery, and a memory for storing an application program for chargingmanagement may wake up, and other structural components may not wake up.When the controller is a multi-core processor including a plurality ofcores, only one core may wake up.

Hereinafter, “charge state” is when battery charging is being performed,and “charging stop state” is when battery charging is paused due to hightemperature (e.g., greater than 63 degrees Celsius), low temperature(e.g., less than −3 degrees Celsius) or full charge. The hightemperature and the low temperature may have different values accordingto an intention of manufacturer of the electronic device.

FIG. 1 illustrates a configuration of an electronic device according toan embodiment of the present invention; and FIG. 2 illustrates acontroller among a configuration of an electronic device according anembodiment of the present invention in detail.

Referring to FIGS. 1 and 2, an electronic device 100 may include a powerunit 190, a battery 180, a charging unit 170, a charging interface unit160, a temperature sensor 150, an alarm unit 140, a display unit 130, amemory 120, and a controller 110.

The charging interface unit 160 is connected to a charger (not shown),which may include a travel, Universal Serial Bus (USB), and solar heatcharger. The charging interface unit 160 included in a current electricdevice 100 has a standard micro USB. However, the present invention isnot limited thereto. That is, persons of ordinary skill in the art willappreciate that the charging interface unit 160 is formed by varioussizes according to a manufacturer's choice. When the electronic device100 supports wireless charging, the charging interface unit 160 issubstituted by a receiving coil (not shown) for generating an inductioncurrent through a magnetic field generated from a transmission coilincluded in a wireless charging pad (not shown).

The charging unit 170 may charge the battery 180 using power input froma charger (not shown) connected to the charging interface unit 160. Thecharging unit 170 is turned-on/off under control of the controller 110to stably charge the battery 180. For example, when the temperature ofthe battery 180 is less than or equal to a preset low reference value(e.g., −3 degrees Celsius) or greater than or equal to a preset highreference value (e.g., 63 degrees Celsius), the charging unit 170 isturned off in a full charge state, such as when charging current is lessthan or equal to 50 mA. When the charging continues longer than a presettime, such as 6 hours, the charging unit 170 is turned off. When voltagedrops to lower than a set voltage, such as 4.1 V, or is less than orequal to the set voltage after a time period such as 30 seconds elapsesin the full charge state, the charging unit 170 is turned-on to rechargethe battery 180.

The charging unit 170 may be turned-on/off according to other situationsfor stably charging the battery 180. In the meantime, when the voltageof the battery 180 is less than or equal to a PreQualification (PQ)threshold value, such as 3.0V, the charging unit 170 may perform highspeed charging.

The battery 180 is a secondary chargeable cell that is manufactured invarious forms such as a nickel, cadmium, nickel-cadmium, lithium-ion,lithium-polymer, and a chemical cell. The battery supplies power torespective structural components of the electronic device 100 throughthe power unit 190, which receives the power from the battery 180,converts the received power into an appropriate voltage, and suppliesthe appropriate voltage of the respective structural components of theelectronic device 100. The power unit 190 may include a Power ManagementIntegrated Circuit (PMIC).

The temperature sensor 150 measures a temperature of the battery 180,and transmits the measured temperature to the controller 110. It ispreferable that the temperature sensor 150 is located adjacent to thebattery 180 to measure an exact temperature. The temperature sensor 150is provided inside the battery 180, and may be a thermistor. However,the present invention is not limited thereto, as temperature sensor 150may be various temperature measuring devices capable of measuring thetemperature and transmitting the measured temperature to the controller110.

The alarm unit 140 is for generating an interrupt signal if a presetalarm time, such as 30 seconds, elapses. When entry into a suspend modeof the electronic device 100 is requested or reentry from a partialwake-up mode to a suspend mode is requested, the alarm unit 140 isactivated. That is, when the electronic device 100 enters the suspendmode or re-enters from a partial wake up mode to the suspend mode, alarmof the alarm unit 140 is set. The alarm unit 140 may generate a wake upsignal every alarm period until a full wake up event occurs, and isimplemented by a Real Time Clock (RTC) or a timer.

The display unit 130 displays information input by or provided to theuser as well as various menus of the electronic device 100. That is, thedisplay unit 130 may provide various screens, such as a home screen, amenu screen, a message creation screen, a call screen, a schedulemanagement screen, an address book screen, and a web page output screenaccording to use of the electronic device 100. In particular, thedisplay unit 130 may display a charging relation message.

For example, when the battery 180 is changed from a charging state to acharging stop state in a partial wake up mode, or is changed from thecharging stop state to the charging state, the display unit 130 maydisplay a message indicating the change. When the battery 180 enters asuspend mode, the display unit 130 is turned off. When a partial wake upevent occurs, the display unit 130 may not be turned-on. When a fullwake up event occurs, the display unit 130 is turned-on. The displayunit 130 is configured by a Liquid Crystal Display (LCD), an OrganicLight Emitted Diode (OLED), or an Active Matrix Organic Light EmittedDiode (AMOLED). When the display unit 130 is configured by a touchscreen type, it may act as an input unit (not shown).

The memory 120 may store an Operating System (OS) of the electronicdevice 100, an application program necessary for other optionsfunctions, such as a voice playback function, an image or moving imageplayback function, or a broadcasting playback function, user data, andtransmitted/received data during communication. For example, the memory120 may store a moving image file, a game file, a music file, and amovie file, as well as a charging management program for controllingcharging of the battery 180.

The charging management program determines a state of the battery 180 ina polling scheme. That is, the charging management program mayperiodically determine a temperature of the battery 180 through thetemperature sensor 150 to determine a state of the battery 180.Furthermore, the charging management program determines a voltage and acurrent of the battery 180, insertion/removal, presence of fullcharge/discharge, a recharging condition of the battery 180 or a chargerto control on/off and charging speed of the charger 170.

The charging management program includes a routine of determining anoccurrence reason of a wake up event when the wake up event occurs by analarm unit 140 in a suspend mode, determining a state of the battery 180through the temperature sensor 150 when there is only the occurrencereason of the wake up reason during an alarm period of the alarm unit asthe determining result, determining whether the state of the battery 180satisfies a preset charging condition to stably charge the battery 180,turning-on the charger 170 to charge the battery 180 when the state ofthe battery 180 satisfies the preset charging condition, and turning-offthe charger 170 to stop charging of the battery 180 when the state ofthe battery 180 does not satisfy the preset charging condition, andcontrolling on/off of the charger 170 according to a state of thebattery 180, resetting an alarm, and requesting reentry into the suspendmode.

The charging management program may read a register or a system memoryarea to confirm the occurrence reason of the wake up event. The chargingmanagement program is implemented in a Kernel or a user applicationarea.

The controller 110 controls an overall operation of the electronicdevice 100 and signal flow between internal blocks of the electronicdevice 100, and performs a data processing function for processing data.For example, the controller 110 is a Central Processing Unit (CPU), aMicro Processor Unit (MPU), or an Application Processor. When thecharging unit 170 requests entry into a suspend mode in an enabledstate, the controller 110 activates the alarm unit 140 and controlsentry into the suspend mode. The enabled state of the charging unit 170refers to when the charger is connected to the charging interface unit160, and includes a state in which the battery 180 is charged and inwhich charging is paused due to full charge or high temperature/lowtemperature. Conversely, a disabled state of the charging unit 170refers to when the charge is not connected to the charging interfaceunit 160.

When a wake up signal is generated by the alarm unit 140 in the suspendmode, the controller 110 may wake up at least partial structuralcomponents. For example, when the controller 110 is a multi-coreprocessor with a plurality of cores, it may turn-on only one core. Tomeasure a temperature of the battery 180, the controller 110 mayactivate the temperature sensor 150 and drive the charging managementprogram. As described above, only the partial structural components areturned-on to minimize current consumption.

The controller 110 determines the temperature of the battery 180 andturns on/off the charging unit 170 according to the determinedtemperature of the battery 180. After turning-on/off the charging unit170, the controller 110 may re-enter the suspend mode and reset thealarm.

To do so, the controller 110 may include an interrupt processor 111, abattery state reader 112, and a charging controller 113. The interruptprocessor 111 may receive an interrupt signal (wake up signal) generatedby the alarm unit 140 and various interrupt signals. When receiving theinterrupt signal, the interrupt processor 111 determines an occurrencereason of a wake up event.

The battery state reader 112 may read whether the battery 180 satisfiesthe charging condition. In particular, when the electronic device 100wakes-up in the suspend mode by the alarm unit 140, the battery statereader 112 determines a temperature of a battery 180 through atemperature sensor 150 to determine whether a state of the batterysatisfies the charging condition based on the determined temperature.For example, when the temperature of the battery 180 is in the range ofa lower temperature reference value to a higher temperature referencevalue, the battery state reader 112 may determine that the chargingcondition is satisfied. The battery state reader 112 may transmit theread result to the charging controller 113.

The charging controller 113 may control on/off and charging current ofthe charging unit 170. In particular, when the electronic devicewakes-up in a suspend mode by an alarm unit 140, the charging controller113 turns on/off the charging unit 170 according to a read resultprovided from the battery state reader 112. For example, when thetemperature of the battery 180 satisfies a charging condition, thecharging controller 113 turns on the charging unit 170. When thetemperature of the battery 180 does not satisfy the charging condition,the charging controller 113 turns off the charging unit 170.

Although not shown in FIG. 1, the electronic device 100 may furtherinclude structural components having an additional function such as aGlobal Positioning System (GPS) module for receiving locationinformation, a broadcasting receiving module for receiving broadcasting,a digital sound source module such as a Motion Pictures Experts Group(MPEG) Layer Audio 3 (MP3) module, and an Internet communication modulefor performing an Internet function.

FIG. 3 illustrates a method for controlling charging in an electronicdevice according to an embodiment of the present invention.

Referring to FIGS. 1 to 3, a controller 110 senses whether an electronicdevice 100 requests entry into a suspend mode during charging or in acharging stop state in step 301. The requesting entry into the suspendmode is sensed when there is no input for longer than a time period or akey or menu signal for requesting entry into the suspend mode is input.

When the requesting entry into the suspend mode is sensed, thecontroller 110 sets alarm in step 303 and enters the suspend mode instep 305. For example, the controller 110 may set alarm such that aninterrupt signal for waking-up at least partial structural components ofthe electronic device 100 after a time period elapses and enter thesuspend mode. The alarm is set using a Real Time Clock (RTC) or a timer.When generating the alarm, it is implemented such that an entireconfiguration of the electronic device 100 wakes-up or partialstructural components for managing charging the battery 180 wake up.However, it is preferable to wake up the partial structural componentsin consideration of current consumption.

When an interrupt occurs according to alarm, the controller 110 may wakeup to determine a state of a battery in step 307, and control (on oroff) charging of the battery 180 according to the determination resultin step 309. For example, the controller 110 determines a temperature ofthe battery 180 through the temperature sensor 150. When the temperatureof the battery 180 is greater than or equal to a preset high temperaturereference value, such as 63 degrees Celsius, or less than or equal to apreset low temperature reference value, such as −3 degrees Celsius, thecontroller 110 may stop charging of the battery 180 in order to preventdanger such as explosion of the battery 180. When the temperature of thebattery 180 is the range of −3 degrees Celsius to 63 degrees Celsius,the controller 110 may charge the battery 180.

The controller 110 then requests reentry of the suspend mode in step 311and returns to step 303 and repeats the foregoing procedures.

As described above, the present invention sets alarm when entry into thesuspend mode is requested, partial structural components of theelectronic device 100 for managing charging of the battery 180 wake upto determine a state of the battery 180, and controls the chargingaccording to the determined result and re-enters the suspend mode.

FIG. 4 illustrates a method for controlling charging in an electronicdevice according to an embodiment of the present invention.

Referring to FIGS. 1 to 4, a controller 110 determines whether entryinto the suspend mode is requested in step 401. When the entry into thesuspend mode is not requested, the controller 110 performs acorresponding function in step 403, such as a music playback function, acall function, and a photographing function according to a request ofthe user. When the entry into the suspend mode is requested, thecontroller 110 determines whether the electronic device is in a chargingstate or a charging stop state in step 405.

When the electronic device is not in the charging state and the chargingstop state, the controller 110 enters the suspend mode in step 409. Whenthe electronic device is in the charging state or the charging stopstate, the controller 110 sets the alarm in step 407. After a timeperiod elapses, the alarm is set to generate an interrupt signal forwaking-up partial structural components of the electronic device 100.The alarm is set using a RTC or a timer.

When the alarm setting is completed, the controller 110 enters thesuspend mode in step 409 and determines whether a wake up event occursin step 411. When it is determined that the wake up event does notoccur, the controller 110 repeatedly performs step 411. When the wake upsignal is generated, the controller 110 determines an occurrence reasonof the wake up event in step 413, and determines whether there is anoccurrence reason of another wake up event other than the set alarm instep 415. The occurrence reason of the wake up event is stored in aregister or a system memory area.

When it is determined that there is no occurrence reason of another wakeup event other than the set alarm, that is, when there is only anoccurrence reason of the wake up event due to the alarm, the controller110 wakes up only partial structural components of the electronic device100 for managing charging of the battery 180 in step 417. For example,when the controller 110 is a multi-core processor, it wakes up one core,the temperature sensor 150 and the memory 120. When the partialstructural components of the electronic device 100 wake up, thecontroller 110 determines a state of the battery 180 in step 419. Forexample, the controller 110 determines a temperature of the battery 180through the temperature sensor 150.

The controller 110 determines whether the electronic device is in achargeable state in step 421, such as by determining whether thetemperature of the battery 180 ranges from a lower temperature referencevalue, such as −3 degrees Celsius, to a higher temperature referencevalue, such as 63 degrees Celsius. When it is determined that theelectronic device is in the chargeable state, the controller 110controls a charging unit 170 to charge the battery 180 in step 423. Thatis, the controller 110 controls the charging unit 170 to maintain acharging state when the electronic device is being charged, and torestart the charging when the electronic device is in a charging stopstate.

When it is determined that the electronic device is not in thechargeable state at step 421, the controller 110 controls to stopcharging of the battery 180 in step 425. That is, the controller 110controls the charging unit 170 to stop the charging when the electronicdevice is in the charging state and to maintain a charging stop statewhen the electronic device is in the charging stop state.

The controller 110 determines whether a full wake up event occurs instep 427. For example, the full wake up event may occur when the charger(not shown) is removed. The full wake up event may include callreception, character reception, and key input.

When the full wake up event does not occur at step 427, the controller110 returns to step 407 and repeats the foregoing steps. That is, thecontroller 110 sets an alarm and re-enters a suspend mode. When the fullwake up event occurs at step 427, the controller 110 proceeds to step429 and wake up entire structural components of the electronic device instep 429 and processes a corresponding event in step 431. For example,when a call receiving event occurs, the controller 110 outputs at leastone of mute, vibration, and bell sound informing call reception, andoutputs a call receiving screen on a display unit 130.

When the processing of the corresponding event is completed, thecontroller 110 returns to step 401. In this case, because it is in thewake up state, the controller 110 determines a state of the battery 180and controls charging of the battery 180 according to the determinedresult. As described above, steps 401 to 431 are repeatedly performeduntil a charger (not shown) is removed.

As described above in the present invention, an alarm is set whenentering a suspend mode, configurations for controlling charging wake upevery alarm period to determine a state of a battery, charging on/off iscontrolled according to the state of the battery and the suspend mode isre-entered. Accordingly, the present invention alleviates therequirement of a separate hardware arrangement for entering a suspendmode while charging the battery and controlling charging of the batteryin the suspend mode.

The method for controlling charging in an electronic device of thepresent invention is implementable in an executable program command formby various computer means and be recorded in a computer readablerecording medium, which may include a program command, a data file, anda data structure individually or a combination thereof. The programcommand recorded in a recording medium may be specially designed orconfigured for the present invention or be known to a person havingordinary skill in a computer software field to be used. The computerreadable recording medium includes Magnetic Media such as hard disk,floppy disk, or magnetic tape, Optical Media such as Compact Disc ReadOnly Memory (CD-ROM) or Digital Versatile Disc (DVD), Magneto-OpticalMedia such as floptical disk, and a hardware device such as ROM. RAM,flash memory storing and executing program commands. The program commandincludes a machine language code created by a complier and a high-levellanguage code executable by a computer using an interpreter. Theforegoing hardware device may be configured to be operated as at leastone software module to perform an operation of the present invention.

Although not illustrated, when the electronic device includes aplurality of batteries, it may sequentially check a plurality ofbatteries to control charging. For example, when the electronic deviceincludes three batteries, the charging control method determines a stateof each of a first, second, and third battery to on/off of charging.

Further, if there is one alarm timer, the controller determines, whenalarm set or reset for generating the wake-up signal is requested,whether another alarm (e.g., morning call) different from the alarm isset. When another alarm is set, the controller may store the anotheralarm and enter a suspend mode. This is performed to prevent the anotheralarm from being erased because the alarm covers the another alarmpreviously set during setting or resetting the alarm according to use ofone timer. In detail, when setting or resetting the alarm, thecontroller compares the another alarm time with an alarm time. When theanother alarm time is less than the alarm time, the controller may setthe another alarm in the timer and set the alarm in the timer aftercompleting the another alarm. For example, when the alarm setting orresetting is requested when an alarm period is 30 seconds and theanother alarm time of 20 seconds remains, the controller sets the timerto count the another alarm and sets the timer to count the alarm aftercompleting the another alarm.

As mentioned above, the method and the apparatus for controllingcharging in an electronic device according to the present invention mayenter a suspend mode during charging a battery to reduce currentconsumption without adding a separate hardware capable of monitoring astate of the battery, and monitor the state of the battery to stablycharge the battery. Accordingly, the present invention may securestability with respect to the battery charging while reducing a cost ofan electronic device. Further, an electronic device of the presentinvention without separate hardware for monitoring a state of a batteryin a suspend mode may enter the suspend mode during charging the batteryto increase battery charging speed. In addition, the present inventionmay enter a suspend mode during the charging to reduce generation ofheat, which results in an increase in battery life.

Although a method and an apparatus for controlling charging in anelectronic device according to embodiments of the present invention havebeen described in detail hereinabove, it should be clearly understoodthat many variations and modifications of the basic inventive conceptsherein taught which may appear to those skilled in the present art willstill fall within the spirit and scope of the present invention, asdefined in the appended claims.

What is claimed is:
 1. A method for controlling charging in anelectronic device, the method comprising: setting an alarm whichgenerates a wake up signal after a time period elapses when entry into asuspend mode is requested during charging of at least one battery or ina charging stop state, and entering the suspend mode; waking up theelectronic device and determining a state of the at least one battery byat least partial structural components of the electronic device when thewake up signal is generated by the set alarm in the suspend mode; andturning on or off the charging of the at least one battery according tothe determined state of the at least one battery.
 2. The method of claim1, further comprising resetting the alarm and re-entering the suspendmode.
 3. The method of claim 1, wherein waking up by the at leastpartial structural components of the electronic device comprises:determining an occurrence reason of the wake up signal when the wake upsignal is generated; and waking up a portion but not all of thestructural components of the electronic device for controlling thecharging when the determined occurrence reason has a wake up reason, bythe set alarm.
 4. The method of claim 3, further comprising waking upall of the structural components of the electronic device when thedetermined wake up reason is a reason other than wake up by the setalarm.
 5. The method of claim 1, wherein turning on or off the chargingof the at least one battery comprises: turning on the charging when thestate of all of the at least one battery satisfies a charging conditionset in the electronic device; and turning off the charging when thestate of the at least one battery does not satisfy a charging conditionset in the electronic device.
 6. The method of claim 1, furthercomprising notifying the user when the charging state is changed from onto off or from off to on.
 7. The method of claim 1, wherein determiningthe state of the at least one battery comprises measuring a temperatureof the at least one battery using a temperature sensor.
 8. The method ofclaim 1, further comprising: determining whether another alarm differentfrom the alarm is set before setting the alarm; and storing the anotheralarm when the another alarm is set.
 9. The method of claim 8, whereinthe setting of the alarm comprises: comparing the another alarm timewith the alarm time; and setting the another alarm when the anotheralarm time is earlier than the alarm time as the comparison result andsetting the alarm after the another alarm is completed, and setting thealarm when the alarm time is earlier than the another alarm time as thecomparison result and setting the another alarm after the alarm iscompleted.
 10. An apparatus for controlling charging in an electronicdevice, the apparatus comprising: a charging unit which charges at leastone battery of the electronic device; a temperatures sensor whichmeasures a temperature of the battery; an alarm unit which sets an alarmwhich generates a wake up signal after a preset time elapses; and acontroller which activates the alarm unit and controls such that thecharging unit enters a suspend mode when the charging unit requestsentry into the suspend mode in an enabled state, and which wakes up atleast a portion of structural components of the electronic device anddetermines a temperature of the at least one battery when a wake upsignal is generated by the alarm unit in the suspend mode, and turns onor off the charging unit according to the determined result.
 11. Theapparatus of claim 10, wherein the controller resets the alarm andre-enters the suspend mode.
 12. The apparatus of claim 10, wherein thecontroller determines an occurrence reason of the wake up signal whenthe wake up signal is generated, and wakes up a portion but not all ofstructural components of the electronic device for controlling thecharging when the determined occurrence reason is another reason thanwake up by the set alarm.
 13. The apparatus of claim 12, the controllerwakes up all of the structural components of the electronic device whenthe determined wake up reason is a reason other than wake up by the setalarm.
 14. The apparatus of claim 10, wherein the controller turns-onthe charging when the state of all of the at least one battery satisfiesa charging condition set in the electronic device, and turns-off thecharging when the state of the at least one battery does not satisfy acharging condition set in the electronic device.
 15. The apparatus ofclaim 10, further comprising a display unit which displays a messagethat notifies when the charging state is changed from on to off or fromoff to on.
 16. The apparatus of claim 10, wherein the controllerdetermines whether another alarm different from the alarm is set beforesetting the alarm, and stores the another alarm and enters the suspendmode when the another alarm is set.
 17. The apparatus of claim 16,wherein the controller compares the another alarm time with the alarmtime when setting the alarm, and preferentially sets an alarm whosealarm time is earlier as the comparison result.
 18. The apparatus ofclaim 10, wherein the temperature sensor is a thermistor.
 19. Theapparatus of claim 10, wherein the alarm unit is a real time clock or atimer.